package com.yzc.tour;

import com.yzc.pojo.Tour;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

/**
* @author Yzc
* @description 针对表【t_tour】的数据库操作Mapper
* @createDate 2024-06-13 15:28:57
* @Entity tour.Tour
*/
@Mapper
public interface TourMapper extends BaseMapper<Tour> {


    @Delete("DELETE FROM t_tour WHERE tourid = #{tourid}")
    void deleteById(int tourid);

    @Insert("INSERT INTO t_tour (tourname, grade, menpiao, address, openhours, endhours) " +
            "VALUES (#{tourname}, #{grade}, #{menpiao}, #{address}, #{openhours}, #{endhours})")
    void saveInfos(Tour tour);

    @Update("UPDATE t_tour SET tourname = #{tourname},grade=#{grade}, menpiao=#{menpiao}," +
            "address=#{address} , openhours=#{openhours}, endhours= #{endhours} WHERE tourid = #{tourid}")
    void updateInfos(Tour tour);
}




